{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <div class="col-sm-12">
            {include file="public/tophead" /}
            <form class="form-horizontal" method="post">
                <div class="tabs-container">
                    <ul class="nav nav-tabs">
                        <li class="active">
                            <a data-toggle="tab" href="#tab-1" aria-expanded="false">OSS配置</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-2" aria-expanded="false">环信Im</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-3" aria-expanded="false">微信</a>
                        </li>
                        <li class="">
                            <a data-toggle="tab" href="#tab-4" aria-expanded="false">支付宝</a>
                        </li>
                    </ul>
                    <div class="tab-content">

                        <div id="tab-1" class="tab-pane active">
                            <div class="ibox-content">
                                {php}
                                $oss = sysConfig('oss');
                                {/php}


                                <div class="form-group">
                                    <label class="col-sm-2 control-label">oss_key_id：
                                        {if $development_display}<br><span style="color: red;">oss[oss_key_id]</span>{/if}</label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[oss_key_id]" value="{present name="$oss['oss_key_id']"}{$oss['oss_key_id']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">oss_key_secret：
                                        {if $development_display}<br><span
                                                style="color: red;">oss[oss_key_secret]</span>{/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[oss_key_secret]" value="{present name="$oss['oss_key_secret']"}{$oss['oss_key_secret']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">oss_endpoint：
                                        {if $development_display}<br><span style="color: red;">oss[oss_endpoint]</span>{/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[oss_endpoint]" value="{present name="$oss['oss_endpoint']"}{$oss['oss_endpoint']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">oss_bucket：
                                        {if $development_display}<br><span style="color: red;">oss[oss_bucket]</span>{/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="oss[oss_bucket]" value="{present name="$oss['oss_bucket']"}{$oss['oss_bucket']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div id="tab-2" class="tab-pane">
                            <div class="ibox-content">
                                {php}
                                $easemob = sysConfig('easemob');
                                {/php}
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">app_key：
                                        {if $development_display}<br><span style="color: red;">easemob[app_key]</span>{/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[app_key]" value="{present name="$easemob['app_key']"}{$easemob['app_key']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">org_name：
                                        {if $development_display}<br><span style="color: red;">easemob[org_name]</span>{/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[org_name]" value="{present name="$easemob['org_name']"}{$easemob['org_name']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">app_name：
                                        {if $development_display}<br><span style="color: red;">easemob[app_name]</span>{/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[app_name]" value="{present name="$easemob['app_name']"}{$easemob['app_name']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">client_id：
                                        {if $development_display}<br><span style="color: red;">easemob[client_id]</span>{/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[client_id]" value="{present name="$easemob['client_id']"}{$easemob['client_id']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">client_secret：
                                        {if $development_display}<br><span
                                                style="color: red;">easemob[client_secret]</span>{/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="easemob[client_secret]" value="{present name="$easemob['client_secret']"}{$easemob['client_secret']}{/present}"
                                        required="required" class="form-control" />
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div id="tab-3" class="tab-pane">
                            <div class="ibox-content">
                                <div class="form-group-title">开放平台</div>
                                {php}
                                $weChatOpen = sysConfig('wechat_open');
                                {/php}
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">AppID:
                                        {if $development_display}
                                        <br><span style="color: red;">wechat_open[app_id]</span>
                                        {/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_open[app_id]"  class="form-control" value="{$weChatOpen['app_id']|default=""}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">AppSecret:
                                        {if $development_display}
                                        <br><span style="color: red;">wechat_open[app_secret]</span>
                                        {/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_open[app_secret]"  class="form-control" value="{$weChatOpen['app_secret']|default=""}" />
                                    </div>
                                </div>

                                <div class="form-group-title">APP支付</div>
                                {php}
                                $weChatPay = sysConfig('wechat_pay');
                                {/php}
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">应用ID:
                                        {if $development_display}
                                        <br><span style="color: red;">wechat_pay[appid]</span>
                                        {/if}
                                        </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_pay[appid]"  class="form-control" value="{$weChatPay['appid']|default=""}" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 微信开放平台审核通过的应用APPID（请登录open.weixin.qq.com查看，注意与公众号的APPID不同）</span>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">商户号:
                                        {if $development_display}
                                        <br><span style="color: red;">wechat_pay[mch_id]</span>
                                        {/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_pay[mch_id]"  class="form-control" value="{$weChatPay['mch_id']|default=""}" />
                                         </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">设置回调地址:</label>
                                    <div class="col-sm-9">
                                        <input type="text" readonly="readonly"  class="form-control" value="{:config('app.wechat.pay.notify_url')}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">密钥key:
                                        {if $development_display}
                                        <br><span style="color: red;">wechat_pay[key]</span>
                                        {/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="wechat_pay[key]"  class="form-control" value="{$weChatPay['key']|default=""}" />
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> key为商户平台设置的密钥key</span>

                                    </div>
                                </div>


                            </div>
                        </div>


                        <div id="tab-4" class="tab-pane">
                            <div class="ibox-content">
                                {php}
                                $alipay = sysConfig('alipay');
                                {/php}
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">app_id(开发平台应用id):
                                        {if $development_display}
                                        <br><span style="color: red;">alipay[app_id]</span>
                                        {/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" name="alipay[app_id]"  class="form-control" value="{$alipay['app_id']|default=""}" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">验签方式 (SIGN_TYPE)：
                                        {if $development_display}
                                        <br><span style="color: red;">alipay[sign_type]</span>
                                        {/if}</label>
                                    <div class="col-sm-9">
                                        <div class="radio i-checks">
                                            <label><input type="radio" value="RSA" name="alipay[sign_type]"  {if isset($alipay['sign_type']) && $alipay['sign_type']=='RSA'}checked="checked"{/if}/> RSA</label>
                                            <label><input type="radio" value="RSA2" name="alipay[sign_type]" {if isset($alipay['sign_type']) && $alipay['sign_type']=='RSA2'}checked="checked"{/if} />RSA2</label>
                                            <!--<label><input type="radio" value="seven_csattle" name="file_store" {if sysConfig('file_store') eq 'seven_csattle'}checked="checked"{/if} /> 七牛</label>-->
                                        </div>
                                        <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请选择正确的验证签名方式，否则支付宝支付不起作用(建议使用RSA2)</span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">支付宝公钥(PUBLIC_KEY):
                                        {if $development_display}
                                        <br><span style="color: red;">alipay[public_key]</span>
                                        {/if}
                                    </label>
                                    <div class="col-sm-9">
                                           <textarea name="alipay[public_key]" class="form-control" rows="3" cols="20">{$alipay['public_key']|default=""}</textarea>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">应用私钥(PRIVATE_KEY):
                                        {if $development_display}
                                        <br><span style="color: red;">alipay[private_key]</span>
                                        {/if}
                                    </label>
                                    <div class="col-sm-9">
                                        <textarea name="alipay[private_key]" class="form-control" rows="3" cols="20">{$alipay['private_key']|default=""}</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__STYLE__/admin/plugins/iCheck/icheck.min.js"}
{load href="__STYLE__/admin/plugins/iCheck/custom.css"}
<script type="text/javascript">
    $(document).ready(function () {
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        });
    });
    $("#upload").click(function () {
        layer.open({
            type: 2,
            title: '上传图片',
            shadeClose: true,
            shade: 0.2,
            area: ['70%', '60%'],
            skin: 'shangchuantup',
            content: "{:url('index/upload', ['type' => 'admin'])}",
            shift: -1,
            scrollbar: false,
            moveType: 1,
            moveOut: true
        });
    });
</script>
{include file="public/bottom" /}